
import 'package:flutter/material.dart';
import 'package:FiduMart/core/network/model/nft_exchange_response_entity.dart';
import 'package:FiduMart/core/utils/image_constant.dart';
import 'package:FiduMart/localization/app_export.dart';
import 'package:FiduMart/widget/custom_image_view.dart';

class PopWelfareRedemptionSuccess extends StatefulWidget{

  NftExchangeResponseEntity nftExchangeResponseEntity;

  PopWelfareRedemptionSuccess({
    Key? key,
    required this.nftExchangeResponseEntity,
  }) : super(key: key);
  @override
  _ContiunePayState createState()=> _ContiunePayState();

}

class _ContiunePayState extends State<PopWelfareRedemptionSuccess> {
  void initState(){
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Dialog(
        backgroundColor: ColorConstant.colorF9D9FF,
        insetPadding: EdgeInsets.symmetric(horizontal: 20, vertical: 80),
        child:  Container(
          height: 480,
          child: Column(
            children: [
              Container(
                width:  MediaQuery.of(context).size.width,
                height: 420,
                decoration: BoxDecoration(
                    image: DecorationImage(
                        image: AssetImage(ImageConstant.Welfare_gift_package),
                        fit: BoxFit.fill
                    )
                ),
                child: Column(
                  children: [
                    SizedBox(height: 100),
                    Text(
                        'congratulations'.tr,
                        style: TextStyle(fontSize: 25,color: Colors.white)
                    ),
                    SizedBox(height: 10),
                    CustomImageView(
                      imagePath: ImageConstant.account_DRNBtnImage,
                      width: 92,
                      height: 92,
                    ),
                    SizedBox(height: 15),
                    Text(
                        widget.nftExchangeResponseEntity.drnAmount.toString(),
                        style: TextStyle(fontSize: 36,color: ColorConstant.colorff2ef9d9)
                    ),
                    SizedBox(height: 40),
                    GestureDetector(
                      onTap: (){
                        Get.back();
                      },
                      child: Container(
                        padding: EdgeInsets.only(left: 10,right: 10),
                        height: 50,
                        decoration: BoxDecoration(
                            image: DecorationImage(
                              image: AssetImage(ImageConstant.icon_gift_ok),
                            )
                        ),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: [
                            Text("lum_gift_ok".tr,style: TextStyle(fontSize: 21,color: Colors.white)),
                          ],
                        ),
                      ),
                    ),
                  ],
                ),
              ),
              SizedBox(height: 15),
              Center(
                child: GestureDetector(
                  onTap: (){
                    Get.back();
                  },
                  child: CustomImageView(
                    imagePath: ImageConstant.gift_package_back,
                    width: 45,
                    height: 45,
                  ),
                ),
              )
            ],
          )
        )
    );
  }

  @override
  void dispose() {
    super.dispose();
  }

}